﻿<UserControl x:Name="userControl" x:Class="WeiTalk.Controls.WeiBoControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:it="clr-namespace:ImageTools.Controls;assembly=ImageTools.Controls" 
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}" Loaded="LayoutRoot_Loaded" MouseLeftButtonUp="Border_MouseLeftButtonUp" MouseLeftButtonDown="Border_MouseLeftButtonDown" VerticalAlignment="Top" Background="#FFFBAFAF" d:DesignWidth="480">

    <UserControl.Resources>
        <Storyboard x:Name="sbSelected">
        	 <DoubleAnimation Duration="0:0:0.5" To="90" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="userControl" d:IsOptimized="True"/>
            <DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="userControl" d:IsOptimized="True"/>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Projection>
        <PlaneProjection/>
    </UserControl.Projection>

    <Border BorderThickness="0,2,0,0" Margin="5,0"  >
    	<Border.BorderBrush>
    		<LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
    			<LinearGradientBrush.RelativeTransform>
    				<CompositeTransform CenterY="0.5" CenterX="0.5" Rotation="90"/>
    			</LinearGradientBrush.RelativeTransform>
    			<GradientStop Color="White" Offset="1"/>
    			<GradientStop Color="#FFF7F7F7"/>
    			<GradientStop Color="White"/>
    			<GradientStop Color="#FF545252" Offset="0.5"/>
    		</LinearGradientBrush>
    	</Border.BorderBrush>
 
        <Grid x:Name="LayoutRoot" Background="#FFF7F7F7"  >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition  Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="1"/>
            </Grid.RowDefinitions>
            <Border Grid.Column="0" CornerRadius="10" BorderThickness="1" Margin="5,9,5,1" Background="#FFEBEBEB">
                <TextBlock  TextWrapping="Wrap" Text="UserName" HorizontalAlignment="Left"   Margin="5" x:Name="tbUserName" Foreground="#FF5E5C5C" FontSize="16"/>
            </Border>
            <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
            	 <Border Grid.Column="0" Background="#FFEBEBEB" CornerRadius="10" BorderThickness="1" Margin="5">
                <TextBlock x:Name="tbCreateAt" TextWrapping="Wrap" Text="CreatedAt"  Margin="5" VerticalAlignment="Top" HorizontalAlignment="Right" Foreground="#FF868686" FontSize="16" />
				</Border>
            </StackPanel>
            <Grid Grid.Row="1" Grid.ColumnSpan="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="65"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
				<Border BorderThickness="0,0,0,2"  Width="50" Height="52" CornerRadius="2" VerticalAlignment="Top" Margin="0,0,1,0">
					<Border.BorderBrush>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<LinearGradientBrush.RelativeTransform>
								<CompositeTransform CenterY="0.5" CenterX="0.5" Rotation="90"/>
							</LinearGradientBrush.RelativeTransform>
							<GradientStop Color="#FFADADAD" Offset="0"/>
							<GradientStop Color="#FFADADAD" Offset="1"/>
							<GradientStop Color="White" Offset="0.504"/>
						</LinearGradientBrush>
					</Border.BorderBrush>
                <Image Width="50" Height="50" VerticalAlignment="Top" x:Name="headImg" Grid.Column="0" HorizontalAlignment="Left" Margin="0,0,0,0" Stretch="UniformToFill" Source="/Images/default.png" RenderTransformOrigin="0.5,0.5" >
                	<Image.Clip>
			             <RectangleGeometry  Rect="0, 0, 50, 50" RadiusX="5" RadiusY="5"/>
			         </Image.Clip>
                	
                	</Image>
		        </Border>
                <StackPanel Orientation="Vertical" Grid.Column="1" HorizontalAlignment="Left" x:Name="spContent">
                    <TextBlock x:Name="tbContent" TextWrapping="Wrap" Text="Text" Margin="15,2,12,10" VerticalAlignment="Top"  HorizontalAlignment="Left" Foreground="#FF0A0A0A" FontSize="21.333" />
                </StackPanel>
                <StackPanel x:Name="spImageWeiBo" Grid.Row="1" Grid.ColumnSpan="2" Margin="0,5" Width="150" Height="150"></StackPanel>  
                <!--<it:AnimatedImage x:Name="imgWeiBo" Width="150" Height="150" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,5" Stretch="Uniform" MouseLeftButtonUp="imgWeiBo_MouseLeftButtonUp" MouseLeftButtonDown="imgWeiBo_MouseLeftButtonDown"/>-->
                <!--<Image  />-->
            </Grid>
            <StackPanel Grid.Row="2" Grid.ColumnSpan="2" x:Name="spRetweeted" Margin="12,0,0,0" >
                <Border BorderThickness="3,8,5,8" CornerRadius="7" Margin="60,0,0,0" Background="#E5E4E2E2">
                    <Grid x:Name="RetweetedGrid" Margin="5,2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="auto"/>
                        </Grid.RowDefinitions>
                        <StackPanel Orientation="Horizontal" Grid.Column="0" Grid.ColumnSpan="2">
                            <TextBlock  TextWrapping="Wrap" Text="RetweetedUserName" HorizontalAlignment="Left"   Margin="5" x:Name="tbRetweetedUserName" FontSize="13.333" Foreground="#FF686868" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                            <TextBlock x:Name="tbRetweetedCreateAt" TextWrapping="Wrap" Text="RetweetedCreateAt"  Margin="5" VerticalAlignment="Top" HorizontalAlignment="Right" FontSize="13.333" Foreground="#FF686868" />
                        </StackPanel>

                        <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Grid.Row="1">
                            <TextBlock  TextWrapping="Wrap" Text="RetweetedContent" VerticalAlignment="Top"   HorizontalAlignment="Left" x:Name="tbRetweetedContent" Margin="15,2,5,0" Foreground="#FF646464" FontSize="18.667" />
                        </StackPanel>
                        <StackPanel x:Name="spImgRetweetedWeiBo" Width="150" Height="150" Grid.Row="2"  />
                        <!--<Image x:Name="imgRetweetedWeiBo" Width="150" Height="150" Grid.Row="2"  HorizontalAlignment="Center" Margin="0,5" Stretch="Uniform" MouseLeftButtonUp="imgRetweetedWeiBo_MouseLeftButtonUp" MouseLeftButtonDown="imgRetweetedWeiBo_MouseLeftButtonDown"/>
                        <Image x:Name="imgRetweetedWeiBoComment" Width="150" Height="150" Grid.Row="2"  HorizontalAlignment="Center" Margin="0,5" Stretch="Uniform"  Visibility="Collapsed" MouseLeftButtonUp="imgRetweetedWeiBo_MouseLeftButtonUp" MouseLeftButtonDown="imgRetweetedWeiBo_MouseLeftButtonDown"/>-->
                        <StackPanel Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Orientation="Horizontal">
                            <TextBlock  TextWrapping="Wrap" Text="RetweetedSource" HorizontalAlignment="Left"   Margin="10,10,5,5" x:Name="tbRetweetedSource"  Foreground="#FF686868" FontSize="13.333"/>
                        </StackPanel>
                        <StackPanel  VerticalAlignment="Bottom" HorizontalAlignment="Right" Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="2" >
                            <TextBlock  TextWrapping="Wrap"   HorizontalAlignment="Right" Margin="10,10,5,5" x:Name="tbRetweetedRepostsCount"  Foreground="#FF686868" FontSize="13.333" />
                            <TextBlock  TextWrapping="Wrap" Text="RetweetedCommentCount" HorizontalAlignment="Right"   Margin="20,5,5,5" x:Name="tbRetweetedCommentsCount"  Foreground="#FF686868" FontSize="13.333" VerticalAlignment="Bottom"/>
                        </StackPanel>
                    </Grid>
                </Border>
            </StackPanel>

            <TextBlock  TextWrapping="Wrap" Text="Source" HorizontalAlignment="Left"  Margin="20,5,5,5" x:Name="tbSource"  Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Foreground="#FF686868" FontSize="13.333"/>
            <StackPanel Grid.Column="1"  Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
                <TextBlock  TextWrapping="Wrap"  HorizontalAlignment="Right"   Margin="20,5,5,5" x:Name="tbRepostsCount" Foreground="#FF686868" FontSize="13.333" VerticalAlignment="Bottom" Text="RepostsCount"/>

                <TextBlock  TextWrapping="Wrap"  HorizontalAlignment="Right"   Margin="20,5,5,5" x:Name="tbCommentsCount"  Foreground="#FF686868" FontSize="13.333" VerticalAlignment="Bottom" Text="CommentsCount"/>
            </StackPanel>
        </Grid>
    </Border>
</UserControl>
